package Duotai;

public class Sanjiaoxing extends TuPet {
	double a, b, c;

	public Sanjiaoxing(double a, double b, double c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	@Override
	public double zhouchang() {
		double zhouchang = a + b + c;
		return zhouchang;
	}

	@Override
	public double mianji() {
		double p = this.zhouchang() / 2;
		double mianji = Math

				.sqrt(p * (p - a) * (p - b) * (p - c));
		return mianji;
	}

}
